package com.service.dialtest.service;

import com.service.dialtest.dto.LoginUserDto;
import com.service.dialtest.dto.WebUserInfoDto;
import com.service.dialtest.entity.WebUserInfo;
import com.service.config.utils.Result;
import com.service.dialtest.vo.WebUserVo;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

public interface UserInfoService {
    /**
     * 用户标准登录
     * @param loginUserDto
     * @param httpServletRequest
     * @return
     * @throws Exception
     */
    HashMap getToken(LoginUserDto loginUserDto, HttpServletRequest httpServletRequest) throws Exception;

    WebUserInfo queryAll(LoginUserDto loginUserDto);

    /**
     * 修改数据
     *
     * @param userInfo 实例对象
     * @return 实例对象
     */
    WebUserInfo update(WebUserInfo userInfo);

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    WebUserInfo queryById(String id);

    Result register(WebUserInfoDto userInfoDto, String realIp) throws Exception;

    Result queryByUserId(String userId);

    Result updateUserInfo(WebUserInfoDto userInfoDto) throws Exception;
}
